
local mt = ac.skill['炽魂']

function mt:on_add()
    local hero = self.owner
    self:gc(hero:event '单位-释放技能结束'(function(_,_,target)
        hero:add_buff '炽魂'{data1 = self.data1,data2 = self.data2,art = self.art}
    end))
end


local buff = ac.buff['炽魂']
buff.time = 8
buff.effect = [[Abilities\Weapons\PhoenixMissile\Phoenix_Missile_mini.mdl]]
buff.tip = [[移速和攻速提升了]]
buff.cover_type = 1

function buff:on_add()
    local hero = self.owner
    self:gc(hero:add_effect(self.effect,'hand left'))
    self:gc(hero:add_effect(self.effect,'hand right'))
    self:gc(hero:add('攻击速度',self.data1))
    self:gc(hero:add('移动速度',self.data2))
end


local mt = ac.skill['龙破斩']
mt.targettype = '点'
mt.range = 900
mt.missile_art = [[units\human\phoenix\phoenix.mdl]]
mt.missile_speed = 1200

function mt:on_cast_shot()
    local hero = self.owner
    local point = self.target:get_point()
    local damage = hero:get('攻击') * self.data1 / 100
    local mover = hero:launch_wave(self.missile_art,hero:get_point()/point,1200,900)
    local track = hero:track_select(mover,150,mover.distance/mover.speed,function(u)
        hero:create_damage(u,damage,self)
    end)
end
